package cn.iocoder.yudao.module.erp.dal.mysql.receiptconfig;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.erp.dal.dataobject.receiptconfig.ReceiptConfigDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.erp.controller.admin.receiptconfig.vo.*;

/**
 * 客户回单配置 Mapper
 *
 * @author 天使管理员
 */
@Mapper
public interface ReceiptConfigMapper extends BaseMapperX<ReceiptConfigDO> {

    default PageResult<ReceiptConfigDO> selectPage(ReceiptConfigPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ReceiptConfigDO>()
                .eqIfPresent(ReceiptConfigDO::getImg, reqVO.getImg())
                .eqIfPresent(ReceiptConfigDO::getCompany, reqVO.getCompany())
                .eqIfPresent(ReceiptConfigDO::getContact, reqVO.getContact())
                .eqIfPresent(ReceiptConfigDO::getContact2, reqVO.getContact2())
                .betweenIfPresent(ReceiptConfigDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ReceiptConfigDO::getId));
    }

}